<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/restricted/template.xhtml">
     
        <ui:define name="title">MeteoCal - Calendar</ui:define>
        <ui:define name="titlePag">#{eventBean.event.name}</ui:define>
        <ui:define name="content">
                    <h:body>

            
            <div class="searchPar">
                <div class="eventoFormPage" style="padding:5px">
                    <h:graphicImage library="images" name="#{eventBean.meteoImg}" width="100px" 
                                    height="100px" style="float:left; margin: 20px"/>
                    <p:spacer width="0px" height="25px"/><br/>
                    <span style="color: #FF7F00">Weather forecast:</span>  #{eventBean.meteo.meteo}<br/><br/>
                    <span style="color: #FF7F00">Description:</span>  #{eventBean.meteo.meteoDescription}<br/><br/>
                    <span style="color: #FF7F00">Temperature (°C):</span> #{eventBean.meteo.temperature}<br/><br/>
                    <br/><span style="color: #FF7F00">Place:</span> #{eventBean.event.place}<br/>

                    <span style="color: #FF7F00">Start Date: </span><h:outputText value="#{eventBean.event.dateStart}">
                        <f:convertDateTime pattern="dd/MM/yyyy" timeZone="Europe/Rome"/>            
                    </h:outputText> -
                    <h:outputText value="#{eventBean.event.dateStart}">
                        <f:convertDateTime pattern="HH:mm" timeZone="Europe/Rome"/>            
                    </h:outputText><br/>
                    <span style="color: #FF7F00">Finish Date: </span>
                    <h:outputText value="#{eventBean.event.dateEnd}">
                        <f:convertDateTime pattern="dd/MM/yyyy" timeZone="Europe/Rome"/>            
                    </h:outputText> -
                    <h:outputText value="#{eventBean.event.dateEnd}">
                        <f:convertDateTime pattern="HH:mm" timeZone="Europe/Rome"/>            
                    </h:outputText><br/>
                    <span style="color: #FF7F00">Environment:</span> #{personalPageBean.eventTypeIo(eventBean.event)} <br/>
                    <span style="color: #FF7F00">Event Type:</span> #{personalPageBean.eventTypePp(eventBean.event)} <br/>
                    <span style="color: #FF7F00">Description:</span> <br/>#{eventBean.event.description} <br/>
                
                    <h:form rendered="#{eventBean.visibility()}">
                    <h:panelGroup id="idPanel" style="float:right; padding:5px; position: relative; bottom:20px;">
                        <h:commandButton styleClass="logoutButton" value="Delete"  action="#{eventBean.deleteEvent()}"  />
                        <h:commandButton styleClass="logoutButton" style='margin-left: 5px' value="Edit"  action="#{eventBean.navigationBean.redirectToEditEventPage()}"  />
                        <!--<div class="logoutButton">
                            <h:link value="Edit" outcome="#{navigationBean.redirectToEditEventPage()}"  />
                        </div>-->
                    </h:panelGroup>
                    </h:form>
                
                    <h:form rendered="#{eventBean.areYouInvited()}">
                    <h:commandButton styleClass="logoutButton" value="#{eventBean.going}" style="float:right" action="#{eventBean.changeGoing()}" /><br/><br/><br/>
                    </h:form>
                </div>

            </div>
            
            </h:body>
        </ui:define>
        
    </ui:composition>
</html>
